$(function(){
    obj.init();
});

var obj = new JsFun();
function JsFun(){
    'use strict';
    return {
        dataGrid: null,
        form: null,
        dom: {
            search: null,
            mainRunUser: null,
            runUser: null,
            tabBar:null,
            tabTitle:null,
            contentForm:null,
            stat:null,
            iFrames: {
                bookVerFrame: null,
                shareFrame: null,
                caseFrame: null,
                contactFrame: null,
                activityFrame:null,
                tchBookFrame: null,
                schoolVisitFrame: null,
                funcModel: null,
                projectHistory: null
            }
        },
        params: {
            stage: {
                1: {
                    11: '一年级',
                    12: '二年级',
                    13: '三年级',
                    14: '四年级',
                    15: '五年级',
                    16: '六年级'
                },
                2: {
                    21: '初一',
                    22: '初二',
                    23: '初三'
                },
                3: {
                    31: '高一',
                    32: '高二',
                    33: '高三'
                }
            },
            stat: null,
            schoolId: null,
            schoolName: null,
        },
        init: function () {
            this.dom.tabBar      = $('.tab-bar');
            this.dom.tabTitle    = $('#title_school').parent().parent().parent();
            this.dom.contentForm = $('#contentForm');
            this.dom.stat = $('#stat');

            this.dom.search      = $('#bt_list_search');
            this.dom.mainRunUser = $('#iMainRunUserId');
            this.dom.runUser     = $('#sRunUserId');

            this.form = new xhForm($('#xh_form'));
            this.form.parse().bindRequired($('#bt_form_add, #bt_form_edit'));

            this.dom.iFrames.bookVerFrame  = $('#bookVerFrame');
            this.dom.iFrames.shareFrame  = $('#shareFrame');
            this.dom.iFrames.caseFrame   = $('#caseFrame');
            this.dom.iFrames.contactFrame = $('#contactFrame');
            this.dom.iFrames.activityFrame = $('#activityFrame');
            this.dom.iFrames.tchBookFrame = $('#tchBookFrame');
            this.dom.iFrames.schoolVisitFrame = $('#schoolVisitFrame');
            this.dom.iFrames.funcModel = $('#funcModel');
            this.dom.iFrames.projectHistory = $('#projectHistory');
            this.dom.mainRunUser.select2({
                width: '10%'
            });
            this.dom.mainRunUser.nextAll('label:eq(0)').css('margin-left', '20px');

            this.dom.runUser.select2({
                placeholder: '选择运营人员',
                multiple: true,
                width: '10%',
                allowClear: true
            });
            this.dom.runUser.prop("disabled", true); //设置禁用
            this.funObj().getFocusLevel();
            this.listener();

            this.params.schoolId = schoolId;
            this.params.schoolName = schoolName;
            $('#title_school').html(schoolName);
            this.dom.tabBar.show();
            this.dom.tabTitle.show();
            this.dom.contentForm.show();
            this.dom.stat.show();
            this.funObj().openEditForm();
            //统计显示
            this.funObj().getStatData();
        },
        listener: function () {
            var $this = this;
            //表单重置
            $('#bt_form_reset').click(function(){
                $this.form.reset();
            });
            //表单返回
            $('#bt_form_back').click(function(){
                xhExtra.backToList();
                $this.dom.tabBar.hide();
                $this.dom.tabTitle.hide();
                $this.dom.contentForm.hide();
            });
            //修改学校
            $('#bt_form_edit').click(function () {
                $this.funObj().submitForm();
            });

            //监听主负责人选择事件
            $this.dom.mainRunUser.on('change',function () {
                if($(this).val()){
                    $this.dom.runUser.prop("disabled", false);
                }else {
                    $this.dom.runUser.prop("disabled", true);
                }
            });
            //学情查看
            $('#bt_list_knowledge').click(function () {
                if (xhExtra.buttonDisabled($(this))) return false;
                $this.funObj().openKnowledge();
            });

            //tab按钮点击事件
            $('.tab-bar a').click(function () {
                $this.funObj().clickTab($(this));
            });
            //省份更改
            $('#sProvinceName').change(function() {
                $this.funObj().changeProv($(this).val());
            }).trigger('change');
            //市更改
            $('#sCityName').change(function() {
                $this.funObj().changeCity($(this).val(),$('#sProvinceName').val());
            }).trigger('change');
            $('#bt_list_refresh_login').click(function () {
                if(xhExtra.buttonDisabled($(this))) return false;
                $this.funObj().refreshLogin();
            });
            $('.cls').click(function () {
                window.top.xhTop.createNewTab('班级管理-' + $this.params.schoolName, baseUrl + 'School/schoolClassManageList?iSchoolId=' + $this.params.schoolId+'&sSchoolName=' + $this.params.schoolName, false, true);
            });

            $('.student').click(function () {
                window.top.xhTop.createNewTab('学校列表-学生管理', baseUrl + 'School/student?iSchoolId=' + $this.params.schoolId, false, true);
            });
            $('.app-group').click(function () {
                window.top.xhTop.createNewTab('学校列表-应用组管理', baseUrl + 'Appgroup/appGroup?schoolId=' + $this.params.schoolId, false, true);
            });
            $('.sch').click(function () {
                var url = '/School/schoolManage?schoolId=' + $this.params.schoolId + '&direction=school';
                window.open(url);
            });
            $('.tch').click(function () {
                window.top.xhTop.createNewTab('学校列表-教师管理', baseUrl + 'School/teacher?iSchoolId=' + $this.params.schoolId, false, true);
            });
            $('.app').click(function () {
                window.top.xhTop.createNewTab('学校列表-应用管理', baseUrl + 'Appserver/schoolApp?schoolId=' + $this.params.schoolId, false, true);
            });
            $('.question-bank').click(function () {
                window.top.xhTop.createNewTab('学校列表-题库管理', baseUrl + 'School/schoolContactQBank?iSchoolId=' + $this.params.schoolId, false, true);
            });
            $('.other-user').click(function () {
                window.top.xhTop.createNewTab('学校列表-其它用户', baseUrl + 'School/otherUser?schoolId=' + $this.params.schoolId, false, true);
            });
            $('.question-king').click(function () {
                window.top.xhTop.createNewTab('学校列表-刷题王分组', baseUrl + 'stats_brush/brushGroup?schoolId=' + $this.params.schoolId, false, true);
            });
            $('.school-book').click(function () {
                var url = baseUrl + 'School/schoolManage?schoolId='+$this.params.schoolId+'&view=partial&direction=Question-index';
                window.open(url);
                // window.top.xhTop.createNewTab('学校列表-校本库', baseUrl + 'School/schoolManage?schoolId='+$this.params.schoolId+'&view=partial&direction=Question-index', false, true);
            });
            $('.manager-more').click(function () {
                $('a[href="#style3Tab9"]').click();
            });
            $("#bt_form_edit").attr('disabled', 'disabled');
            $('.school-edit').click(function () {
                $("#bt_form_edit").removeAttr('disabled');
            })
        },
        funObj: function(){
            var $this = this;
            return {
                // bindDataGridEvent: function () {
                //     $this.dataGrid.onLoadSuccess = function(data) {
                //         xhExtra.checkError(data);
                //         $this.dataGrid.clear();
                //
                //         //添加刷题王分组状态
                //         var rows = $this.dataGrid.command('getRows');
                //         $.each(rows, function (index, row) {
                //             $this.dataGrid.command('updateRow', {index: index, row: {brushGroupStatus: '<a class="btn btn-default btn-sm brush-status" data-index="' + index + '">点击刷新</a>'}});
                //         });
                //
                //         $('#list').datagrid('getPanel').find('tr.datagrid-row').bind('mouseover mouseout',function(e){
                //             var span = $(this).find("td[field='iSchoolIdModify']").children('div').children(span);
                //
                //             if (e.type == 'mouseover') {
                //                 span.toggleClass('display_none');
                //             }
                //             if (e.type == 'mouseout') {
                //                 span.toggleClass('display_none');
                //             }
                //         });
                //     };
                //     $this.dataGrid.onDblClickRow = function (rowIndex, rowData) {
                //         $this.params.schoolId = rowData.iSchoolId;
                //         $this.params.schoolName = rowData.sSchoolName;
                //         var schoolName = rowData.sSchoolName;
                //         $('#title_school').html(schoolName+'<a id="tabReturn"  class="btn btn-sm btn-default pull-right return" style="margin-right: 20px">返回</a>');
                //         $this.dom.tabBar.show();
                //         $this.dom.tabTitle.show();
                //         $this.dom.contentForm.show();
                //         $this.dom.stat.show();
                //         $this.funObj().openEditForm($this.params.schoolId);
                //         // window.top.xhTop.createNewTab('学校设置-' + rowData.sSchoolName, baseUrl + 'School/schoolSetting?iSchoolId=' + rowData.iSchoolId+'&sSchoolName=' + rowData.sSchoolName, false, true);
                //         //统计显示
                //         $this.funObj().getStatData();
                //     };
                // },
                openEditForm: function () {
                    $this.dom.iFrames.bookVerFrame.attr('src', null);
                    $this.dom.iFrames.shareFrame.attr('src', null);
                    $this.dom.iFrames.caseFrame.attr('src', null);
                    $this.dom.iFrames.contactFrame.attr('src', null);
                    $this.dom.iFrames.activityFrame.attr('src', null);
                    $this.dom.iFrames.tchBookFrame.attr('src', null);
                    $this.dom.iFrames.schoolVisitFrame.attr('src', null);
                    $this.dom.iFrames.funcModel.attr('src', null);
                    $this.dom.iFrames.projectHistory.attr('src', null);
                    $('a[href="#style3Tab1"]').click();
                    xhExtra.ajaxRequest('School/getSchoolInfo/' + schoolId, {}, {}, function(data) {
                        data.sRunUserId = data.sRunUserId.split(',');
                        $('#sCityName').html('');
                        $('#sCountyName').html('');
                        $this.form.reset().fill(data);
                        $('#iStage').trigger('change');
                        $.each(data.focusLevel, function (code, level) {
                            $('.stage-' + data.iStage).find('select[name="focusLevel['+ code +']"]').val(level);
                        });

                        if (data.sProvinceName){
                            $this.funObj().changeProv(data.sProvinceName, true, data.sCityName);
                            $('#sProvinceName').val(data.sProvinceName);
                        }

                        if (data.sCityName){
                            $this.funObj().changeCity(data.sCityName, data.sProvinceName ,true,  data.sCountyName);
                        }
                        xhExtra.forwardToForm(true);
                        $this.dom.runUser.add($this.dom.mainRunUser).trigger('change');
                    });
                },

                openWeekly: function () {
                    window.top.xhTop.createNewTab(
                        '周报-' + $this.dataGrid.getSelectValue('sSchoolName').replace(/<\/?.+?>/g,"").replace(/&nbsp;/g,""),
                        baseUrl + 'school_week/weekly?schoolId=' + $this.dataGrid.getSelectValue('iSchoolId'),
                        true
                    );
                },
                lookWeekList:function () {
                    window.top.xhTop.showModal({
                        title: '周报-'+$this.dataGrid.getSelectValue('sSchoolName').replace(/<\/?.+?>/g,"").replace(/&nbsp;/g,""),
                        content: '<iframe src="'+baseUrl+'school_week/weekList/'+$this.dataGrid.getSelectValue('iSchoolId')+'"  style="width: 100%;height: 470px;border-style: none;padding: 0px;"  scrolling="yes"></iframe>',
                    });
                },
                changeStage: function (stage) {
                    $('.stage').hide().find('select').attr('disabled', true);
                    $('.stage-' + stage).fadeIn().find('select').attr('disabled', false);
                },
                changeProv: function (provId, needSelect, cityName) {
                    xhExtra.ajaxRequest('School/getCityDataByProv', {provId:provId}, {async:false}, function (result) {
                        $('#sCityName').html('');
                        $('#sCountyName').html('');
                        $.each(result, function (key, value) {
                            if (needSelect && key == cityName){
                                $('#sCityName').append('<option selected value="'+ key +'">'+ value +'</option>');
                            } else {
                                $('#sCityName').append('<option value="'+ key +'">'+ value +'</option>');
                            }
                        });
                    });
                },
                changeCity: function (cityId, provId,setCounty,countyData) {
                    xhExtra.ajaxRequest('School/getCountryDataByCity', {provId:provId, cityId:cityId}, {async:false}, function (result) {
                        $('#sCountyName').html('');
                        $.each(result, function (key, value) {
                            if (setCounty===true && key == countyData){
                                $('#sCountyName').append('<option selected value="'+ key +'">'+ value +'</option>');
                            } else {
                                $('#sCountyName').append('<option value="'+ key +'">'+ value +'</option>');
                            }

                        });
                    });
                },
                getFocusLevel: function () {
                    xhExtra.ajaxRequest('School/getFocusLevel', {}, {}, function (result) {
                        $.each(result, function (key, value) {
                            $('.stage select').append('<option value="'+ key +'">'+ value +'</option>');
                        });
                    });
                },
                refreshBrushStatus: function (index) {
                    return new Promise(function(resolve, reject) {
                        index = parseInt(index);
                        $this.dataGrid.command('updateRow', {index: index, row: {
                                brushGroupStatus: '<i class="fa fa-spinner fa-spin"></i>'
                            }});
                        var row = $this.dataGrid.command('getRows')[index];
                        xhExtra.ajaxRequest('stats_brush/checkBrushGroupStatus', {schoolId: row.iSchoolId}, {/*async: false*/}, function (data) {
                            var status = '';
                            if (data.groupClass >= data.classNum) {
                                status = 'btn-success';
                            }
                            else if (data.groupClass === 0) {
                                status = 'btn-danger';
                            }
                            else {
                                status = 'btn-warning';
                            }
                            $this.dataGrid.command('updateRow', {index: index, row: {
                                    brushGroupStatus: '<a class="btn ' + status + ' btn-sm brush-status" data-index="' + index + '">' + data.groupClass + '/' + data.classNum + '</a>'
                                }});
                            // return true;
                            resolve();
                        });
                    });
                },
                refreshAllBrushStatus: function* () {
                    var rows = $this.dataGrid.command('getRows');
                    for (var index in rows) {
                        $this.funObj().refreshBrushStatus(index);
                    }
                },
                submitForm: function () {
                    $this.form.submit(baseUrl + 'School/modifyData', {sRunUserId: $this.dom.runUser.val() ? $this.dom.runUser.val() .join(',') : ''}, function (data) {
                        if (xhExtra.checkError(data)) return false;
                        window.top.xhTop.showSuccess(data.msg);
                        window.location.reload();
                        xhExtra.backToList($this.dataGrid);
                        $this.dom.tabBar.hide();
                        $this.dom.tabTitle.hide();
                        $this.dom.contentForm.hide();
                        $this.dom.stat.hide();
                    });
                },
                himmel: function (gen) {
                    const item = gen.next();
                    if (item.done) {
                        return item.value
                    }

                    var value = item.value;
                    if (value instanceof Promise) {
                        value.then((e) => $this.funObj().himmel(gen));
                    } else {
                        $this.funObj().himmel(gen);
                    }
                },
                openKnowledge: function () {
                    window.top.xhTop.createNewTab(
                        '学情-' + $this.dataGrid.getSelectValue('sSchoolName'),
                        baseUrl + 'manage/knowledge/index.html?schoolId=' + $this.dataGrid.getSelectValue('iSchoolId'),
                        true
                    );
                },
                clickTab:function (target) {
                    var id = $(target).attr('href');
                    if (id == '#style3Tab1'){
                        return false;
                    }
                    var frame = $(''+id+'').find('iframe');
                    if(frame[0]['src'] == '' || frame[0]['src'] == 'about:blank') {
                        switch (frame[0]['id']){
                            case 'bookVerFrame':
                                $this.dom.iFrames.bookVerFrame.attr('src',baseUrl+'school/schoolBookVer?schoolId='+$this.params.schoolId);
                                break;
                            case 'shareFrame':
                                $this.dom.iFrames.shareFrame.attr('src',baseUrl+'school_share/schoolShare?schoolId='+$this.params.schoolId);
                                break;
                            case 'caseFrame' :
                                $this.dom.iFrames.caseFrame.attr('src',baseUrl+'article/msgList?type=7&schoolId='+$this.params.schoolId);
                                break;
                            case 'contactFrame':
                                $this.dom.iFrames.contactFrame.attr('src',baseUrl+'school_contact/contact?schoolId='+$this.params.schoolId);
                                break;
                            case 'activityFrame':
                                $this.dom.iFrames.activityFrame.attr('src',baseUrl+'article/activityList?schoolId='+$this.params.schoolId);
                                break;
                            case 'tchBookFrame':
                                $this.dom.iFrames.tchBookFrame.attr('src',baseUrl+'statsschool/tchBook?schoolId='+$this.params.schoolId);
                                break;
                            case 'schoolVisitFrame':
                                $this.dom.iFrames.schoolVisitFrame.attr('src',baseUrl+'school_visit/schoolVisit?schoolId='+$this.params.schoolId);
                                break;
                            // window.top.xhTop.createNewTab('学校设置-' + rowData.sSchoolName, baseUrl + 'School/schoolSetting?iSchoolId=' + rowData.iSchoolId+'&sSchoolName=' + rowData.sSchoolName, false, true);
                            case 'funcModel':
                                $this.dom.iFrames.funcModel.attr('src',baseUrl+'School/schoolSetting?iSchoolId='+$this.params.schoolId);
                                break;
                            // $this.dom.iFrames.funcModel.attr('src',baseUrl+'School/schoolSetting?iSchoolId='+$this.dataGrid.getSelectValue('iSchoolId'));
                            case 'projectHistory':
                                $this.dom.iFrames.projectHistory.attr('src',baseUrl+'School/project?iSchoolId='+$this.params.schoolId);
                                break;
                            default:
                                break;
                        }
                    }

                    // frame.attr('src', frame.attr('src'));
                },
                getXhClass: function () {
                    var myChart = echarts.init(document.getElementById('stat-class'));
                    var option = {
                        title : {
                            text: '班级',
                            x:'center',
                            bottom: 0,
                            textStyle: {
                                fontWeight: 'normal',
                                fontSize: 12
                            },
                            padding: 0,
                        },
                        tooltip : {
                            trigger: 'item',
                            formatter: "{a}{b} : {c} ({d}%)",
                            confine: true
                        },
                        series : [
                            {
                                name: '班级-',
                                type: 'pie',
                                radius : '55%',
                                center: ['50%', '50%'],
                                data:$this.params.stat.stu_grade,
                                itemStyle: {
                                    emphasis: {
                                        shadowBlur: 10,
                                        shadowOffsetX: 0,
                                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                                    }
                                }
                            }
                        ]
                    };
                    myChart.setOption(option);
                },
                getTeacher: function (type) {
                    if (type == 'sex') {
                        var id = 'stat-teacher-sex';
                        var option = {
                            title : {
                                text: '教师性别',
                                x:'center',
                                bottom: 0,
                                textStyle: {
                                    fontWeight: 'normal',
                                    fontSize: 12
                                },
                                padding: 0,
                            },
                            tooltip : {
                                trigger: 'item',
                                formatter: "{a}{b} : {c} ({d}%)",
                                confine: true
                            },
                            series : [
                                {
                                    name: '教师性别-',
                                    type: 'pie',
                                    radius : '55%',
                                    center: ['50%', '50%'],
                                    data:$this.params.stat.tch_sex,
                                    itemStyle: {
                                        emphasis: {
                                            shadowBlur: 10,
                                            shadowOffsetX: 0,
                                            shadowColor: 'rgba(0, 0, 0, 0.5)'
                                        }
                                    }
                                }
                            ]
                        };
                    }
                    if (type == 'age') {
                        var id = 'stat-teacher-age';
                        var option = {
                            title : {
                                text: '教师年龄',
                                x:'center',
                                bottom: 0,
                                textStyle: {
                                    fontWeight: 'normal',
                                    fontSize: 12
                                },
                                padding: 0,
                            },
                            tooltip : {
                                trigger: 'item',
                                formatter: "{a}{b} : {c} ({d}%)",
                                confine: true
                            },
                            series : [
                                {
                                    name: '教师年龄',
                                    type: 'pie',
                                    radius : '55%',
                                    center: ['50%', '50%'],
                                    data:$this.params.stat.tch_age,
                                    itemStyle: {
                                        emphasis: {
                                            shadowBlur: 10,
                                            shadowOffsetX: 0,
                                            shadowColor: 'rgba(0, 0, 0, 0.5)'
                                        }
                                    }
                                }
                            ]
                        };
                    }
                    var teacher = echarts.init(document.getElementById(id));
                    teacher.setOption(option);
                },
                getStudent: function () {
                    var option = {
                        title : {
                            text: '学生性别',
                            x:'center',
                            bottom: 0,
                            textStyle: {
                                fontWeight: 'normal',
                                fontSize: 12
                            },
                            padding: 0,
                        },
                        tooltip : {
                            trigger: 'item',
                            formatter: "{a}{b} : {c} ({d}%)",
                            confine: true
                        },
                        series : [
                            {
                                name: '学生性别-',
                                type: 'pie',
                                radius : '55%',
                                center: ['50%', '50%'],
                                data:$this.params.stat.stu_sex,
                                itemStyle: {
                                    emphasis: {
                                        shadowBlur: 10,
                                        shadowOffsetX: 0,
                                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                                    }
                                }
                            }
                        ]
                    };
                    var student = echarts.init(document.getElementById('stat-student-sex'));
                    student.setOption(option);
                },
                rightStat:function () {
                    var myChart = echarts.init(document.getElementById('stat-right'));
                    var option = {
                        color: ['#3398DB'],
                        tooltip : {
                            trigger: 'axis',
                            axisPointer : {            // 坐标轴指示器，坐标轴触发有效
                                type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
                            }
                        },
                        grid: {
                            left: '3%',
                            right: '4%',
                            bottom: '3%',
                            containLabel: true
                        },
                        xAxis : [
                            {
                                type : 'category',
                                data : $this.params.stat.right.name,
                                axisTick: {
                                    alignWithLabel: true
                                }
                            }
                        ],
                        yAxis : [
                            {
                                type : 'value'
                            }
                        ],
                        series : [
                            {
                                name:'',
                                label:{
                                    normal: {
                                        show: true,
                                        position: 'top',
                                        distance: 8,
                                        align: 'center',
                                        verticalAlign: 'bottom',
                                        rotate: 0,
                                        formatter: '{c} {a}',
                                        fontSize: 16,
                                        rich: {
                                            name: {
                                                textBorderColor: '#fff'
                                            }
                                        }
                                    }
                                },
                                type:'bar',
                                barWidth: '60%',
                                data:$this.params.stat.right.value
                            }
                        ]
                    };
                    myChart.setOption(option);
                },
                getYunyingStat: function () {
                    var myChart = echarts.init(document.getElementById('chart_examine'));
                    var option = {
                        xAxis: {
                            type: 'category',
                            data: $this.params.stat.examine.xList
                        },
                        yAxis: {
                            type: 'value'
                        },
                        dataZoom: [
                            {
                                id: 'dataZoomX',
                                type: 'slider',
                                xAxisIndex: [0],
                                filterMode: 'filter'
                            },
                        ],
                        series: [{
                            data: $this.params.stat.examine.num,
                            type: 'line',
                            label:{
                                normal: {
                                    show: true,
                                    position: 'top',
                                    distance: 8,
                                    align: 'center',
                                    verticalAlign: 'bottom',
                                    rotate: 0,
                                    // formatter: '{c} {a}',
                                    fontSize: 16,
                                    rich: {
                                        name: {
                                            textBorderColor: '#fff'
                                        }
                                    }
                                }
                            },
                        }]
                    };
                    myChart.setOption(option);
                },
                getStatData: function () {
                    $.ajax({
                        url: '/School/getStatData',
                        data: {schoolId: $this.params.schoolId},
                        async : false,
                        type : "POST",
                        success : function (data){
                            $this.params.stat = data;
                            // console.log($this.params.stat)
                            if (data.stu_grade) {
                                $this.funObj().getXhClass();
                            }
                            if (data.stu_sex) {
                                $this.funObj().getStudent();
                            }
                            if (data.tch_sex) {
                                $this.funObj().getTeacher('sex');
                            }
                            if (data.tch_age) {
                                $this.funObj().getTeacher('age');
                            }

                            //当月数据得分
                            $('.mask').find('span').html(data.score.format);
                            $('#final_score').html('得分：'+data.score.score);
                            $('#end_time').html('截止时间：'+data.score.end_time);
                            $('.circle').each(function(index, el) {
                                var num = $(this).find('span').text() * 3.6;
                                if (num<=180) {
                                    $(this).find('.right').css('transform', "rotate(" + num + "deg)");
                                } else {
                                    $(this).find('.right').css('transform', "rotate(180deg)");
                                    $(this).find('.left').css('transform', "rotate(" + (num - 180) + "deg)");
                                };
                            });

                            $this.funObj().rightStat();
                            $this.funObj().getYunyingStat();
                        }
                    })
                },
            }
        }
    }
}

